package tech.yixiyun.framework.kuafu.domain;


import tech.yixiyun.framework.kuafu.domain.annotation.Key;
import tech.yixiyun.framework.kuafu.domain.annotation.KeyType;

/**
 * 表索引定义
 */
public class KeyDefinition {

    private String name;
    private KeyType type;
    private String[] columns;


    public KeyDefinition() {}

    public KeyDefinition(Key index) {
        this.name = index.name();
        this.type = index.type();
        this.columns = index.columns();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public KeyType getType() {
        return type;
    }

    public void setType(KeyType type) {
        this.type = type;
    }

    public String[] getColumns() {
        return columns;
    }

    public void setColumns(String[] columns) {
        this.columns = columns;
    }
}
